package com.demo.web.admin.config;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import com.demo.web.admin.tag.SysParameterTag;

import freemarker.template.TemplateModelException;

@Configuration
public class FreemarkerTagConfig {
	
	 @Autowired
	 private freemarker.template.Configuration configuration;
	
	 @Autowired
	 private SysParameterTag sysParameterTag;
	 
	@PostConstruct
	  public void setSharedVariable() throws TemplateModelException {
	    	configuration.setSharedVariable("demo_param", sysParameterTag);//注册freemark自定义标签
	  }

}
